python multiple if statements on one line